<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.prime.com.tr/ui">

    <ui:composition template="/template/DefaultTemplate.xhtml">
        <ui:define name="title">
            <h:outputText value="View Price List"></h:outputText>
        </ui:define>
        <ui:define name="content">
            <h:form>
                <p:panel header="View Price List ##{priceListEntityController.selected.id}">
                    <p:messages />
                    <br />
                <h:panelGrid columns="2">
                    <h:outputText value="Type:"/>
                    <h:outputText value="#{priceListEntityController.selected.type}" />
                    <h:outputText value="Product:"/>
                    <h:outputText value="#{priceListEntityController.selected.product}"/>
                    <h:outputText value="Tiered Quantity:"/>
                    <h:outputText value="#{priceListEntityController.selected.tieredQuantity}"/>
                    <h:outputText value="Price:"/>
                    <h:outputText value="#{priceListEntityController.selected.price}"/>
                    <h:outputText value="Created By:"/>
                    <h:outputText value="#{priceListEntityController.selected.createdBy}" />
                    <h:outputText value="Created At:"/>
                    <h:outputText value="#{priceListEntityController.selected.createdAt}" >
                        <f:convertDateTime pattern="MM/dd/yyyy" />
                    </h:outputText>
                    <h:outputText value="Last Modified By:"/>
                    <h:outputText value="#{priceListEntityController.selected.lastModifiedBy}"/>
                    <h:outputText value="Last Modified At:"/>
                    <h:outputText value="#{priceListEntityController.selected.lastModifiedAt}">
                        <f:convertDateTime pattern="MM/dd/yyyy" />
                    </h:outputText>   
                </h:panelGrid>
                <br />
                <p:commandButton ajax="false" action="#{priceListEntityController.destroyAndView}" value="Delete"/>
                &nbsp;
                <p:commandButton ajax="false" action="Edit" value="Edit"/>
                &nbsp;
                <p:commandButton ajax="false" action="#{priceListEntityController.prepareCreate}" value="Create" />
                &nbsp;
                <p:commandButton ajax="false" action="#{priceListEntityController.prepareList}" value="Show All"/>
                <br />
                <br />
                </p:panel>
            </h:form>
        </ui:define>
    </ui:composition>

</html>
